package com.yby.mall.coupon.service.impl;

import com.yby.common.dto.SkuFullReductionDto;
import com.yby.common.utils.R;
import com.yby.mall.coupon.dao.SkuFullReductionDao;
import com.yby.mall.coupon.entity.SkuFullReductionEntity;
import com.yby.mall.coupon.service.SkuFullReductionService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SkuFullReductionServiceImpl implements SkuFullReductionService {
    @Autowired
    private SkuFullReductionDao skuFullReductionDao;
    @Override
    public R save(SkuFullReductionDto skuFullReductionDto) {
        SkuFullReductionEntity skuFullReductionEntity = new SkuFullReductionEntity();
        BeanUtils.copyProperties(skuFullReductionDto,skuFullReductionEntity);
        skuFullReductionDao.insert(skuFullReductionEntity);
        return R.ok();
    }
}
